<?php

if ( !defined( 'BASEPATH' ) ) exit( 'No direct script access allowed' );

/**
 * 底部模块
 */
class Footer extends MY_Controller
{

    public function _init()
    {
        $this->load->model( 'link_model' );
    }

    public function index()
    {
        $data = array( );
        $data['link_data'] = $this->_get_link();
        if( defined( 'ENVIRONMENT' ) && ENVIRONMENT != 'production' ) $this->output->enable_profiler();
        $this->load->view( 'footer', $data );
    }

    /**
     * 获取友情链接数据
     */
    private function _get_link()
    {
        return $this->link_model->getAll();
    }

}